package com.tanhua.server.exception;

import lombok.Data;

/**
 * @Description: test
 * @Create by: JJ菜菜
 * @Date: 2021/11/29 23:29
 *
 *  自定义业务异常类，针对业务错误之间抛出业务异常即可
 */

@Data
public class BusinessException extends RuntimeException{

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult){
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }

}
